# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=fio
pkgver=3.36
pkgrel=0
pkgdesc="Flexible I/O Tester"
url="https://github.com/axboe/fio"
arch="all"
license="GPL-2.0-only"
makedepends="
	libaio-dev
	linux-headers
	numactl-dev
	zlib-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/axboe/fio/archive/fio-$pkgver.tar.gz"
builddir="$srcdir/fio-$pkgname-$pkgver"

build() {
	./configure \
		--prefix=/usr \
		--disable-native
	make
}

check() {
	make test
}

package() {
	make mandir=/usr/share/man DESTDIR="$pkgdir" install
	install -Dm644 README.rst REPORTING-BUGS MORAL-LICENSE \
		-t "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
4257bc61b521f6ef6dd3b9cdf3d78ab5c6bceee05a306e101195343edfdde267b7a2b912b140241d0fb418cbbd42353aaad6c02b7e2aa1dbfe744b405a85f397  fio-3.36.tar.gz
"
